﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace KinectAssistant
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void button_ppt_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog1 = new OpenFileDialog();

            //openFileDialog1.InitialDirectory = "c:\\";
            openFileDialog1.Filter = "pptx files (*.pptx)|*.pptx";
            openFileDialog1.FilterIndex = 0;
            openFileDialog1.RestoreDirectory = true;

            if (openFileDialog1.ShowDialog()== DialogResult.OK)
            {
                string filepath = openFileDialog1.FileName;
                string filename = openFileDialog1.SafeFileName;

                System.Diagnostics.Process.Start(filepath);

                Controller.ControlPPT(filename);
            }
        }

        private void button_image_Click(object sender, EventArgs e)
        {
            //Form ImageForm1=new ImageForm();
            //ImageForm1.Show();
            OpenFileDialog openFileDialog1 = new OpenFileDialog();

            //openFileDialog1.InitialDirectory = "c:\\";
            openFileDialog1.Filter = "Image files (*.BMP;*.JPG;*.GIF;*.jpeg;*.ico)|*.BMP;*.JPG;*.GIF;*.jpeg;*.ico";
            openFileDialog1.FilterIndex = 0;
            openFileDialog1.RestoreDirectory = true;

            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                string filepath = openFileDialog1.FileName;
                string filename = openFileDialog1.SafeFileName;

                Controller.ControlImage(filepath);
            }

            
        }

        private void button_blackboard_Click(object sender, EventArgs e)
        {
            //to do
            BlackBoardForm blackBoradForm = new BlackBoardForm();
            blackBoradForm.Show();
            Controller.ControlBlackboard();
        }
    }
}
